home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / gfx / misc / id_v143.lha / ID / Install next >
Text File  |  1999-02-14  |  9KB  |  399 lines

  1. ;$VER: Image Descriptor Install Script 1.4 (28.12.98) hApPy NeW yEaR `99
  2.  
  3. (onerror (CLEANUP))
  4. (procedure CLEANUP
  5.     (delete "t:gfx1")
  6.     (delete "t:gfx1.prefs")
  7.     (exit "\n\n\n\nInstallation aborted !\n\n\nBecouse installation was aborted it is unable to uninstall files already copied.\n\nCheck what happens and try again ..." (quiet))
  8. )
  9.  
  10. (set @user-level 2)
  11. (set #version @installer-version)
  12. (set #ver (/ #version 65536))
  13. (if (< #ver 43)
  14.     (exit "\n\n\n\nYou have incorrect version of Installer." (quiet))
  15. )
  16. (working "Please wait... Installer preparing files.")
  17. (if
  18.     (= (exists "S:.owner") "1")
  19.     (
  20.         (copyfiles
  21.             (prompt "Working ...\n")
  22.             (source "s:.owner")
  23.             (dest "env:")
  24.             (newname "emax.temp")
  25.             (nogauge)
  26.         )
  27.         (delete "s:.owner")
  28.     )
  29. )
  30. (if
  31.     (= (exists "env:emax_owner.idf") "0")
  32.     (rename "env:emax.temp" "env:emax_Owner.idf")
  33.     (delete "env:emax.temp")
  34. )
  35.  
  36. (set #user_name (getenv "emax_owner.idf"))
  37. (copyfiles
  38.     (prompt "Working ...\n")
  39.     (source "installerfx/install_lo.iff")
  40.     (dest "T:")
  41.     (newname "gfx1")
  42.     (help    @copyfiles-help)
  43.     (nogauge)
  44. )
  45. (copyfiles
  46.     (prompt "Working ...\n")
  47.     (source "installerfx/install.prefs")
  48.     (dest "T:")
  49.     (newname "gfx1.prefs")
  50.     (help    @copyfiles-help)
  51.     (nogauge)
  52. )
  53.  
  54. (run "run installerfx/InstallerFX T:GFX1")
  55.  
  56. (set #hi_user ("\nHello %s !" #user_name))
  57. (message #hi_user
  58.     "\nWelcome to Image Descriptor 1.4.3 Installation Script\n"
  59.     "------------------------------------\n\n"
  60.      "Created by Tomasz Malerczyk\n(c)1998 Emax SC.\n\n"
  61.      "This script will install Image Descriptor 1.4.3 on your Amiga\n\n"
  62.      "\n\n"
  63.      "Do you wish to proceed?"
  64. )
  65.  
  66. (message
  67.     "IMPORTANT !\n"
  68.     "---------------\n"
  69.     "Image Descriptor operates on ILBM and GIF images but don`t "
  70.     "decompress it.\nSo it don`t use any (de)compress algorithms.\n"
  71.     "Installer script powered by InstallerFX by TRIUMPH\n\n"
  72.     "Image Descriptor use great requester toolkit called:\n"
  73.     "reqtools.library\n"
  74.     "Copyright by Nico François and Magnus Holmgren.\n\n"
  75.     "Image Descriptor was coded in pure assembler using:\n"
  76.     "ASM-PRO by GENETIC\n"
  77.     "http://surf.to/asmpro"
  78. )
  79.  
  80. (set #imie
  81. (askstring
  82.     (prompt
  83.         "Image Descriptor - Ownership Information\n\n"
  84.         "Please enter your name, it will be used in ABOUT info\n"
  85.         "to show who is owner of this Image Descriptor copy"
  86.     )
  87.     (help   @askstring-help)
  88.     (default #user_name)
  89. )
  90. )
  91.  
  92. (makedir "ENVARC:ImageDescriptor"
  93.     (prompt "Creating ImageDescriptor drawer in ENVARC:\n")
  94.     (help    @makedir-help)
  95. )
  96.  
  97. (textfile
  98.     (prompt "Creating ownership file ...\n")
  99.     (help    @textfile-help)
  100.     (dest    "EnvArc:emax_Owner.idf")
  101.     (append    #imie)
  102. )
  103.  
  104. (set #icon
  105.     (askchoice
  106.         (prompt "Please select Icons style.\n")
  107.         (help    @askchoice-help)
  108.         (choices
  109.            "Standard"
  110.            "MagicWB"
  111.            "NewIcons"
  112.         )
  113.     )
  114. )
  115.  
  116. (set #doc-type
  117.     (askchoice
  118.         (prompt "Please select Documentation type.\n")
  119.         (help    @askchoice-help)
  120.         (choices
  121.             "Standard text file"
  122.             "Amiga Guide document"
  123.         )
  124.     )
  125. )
  126.  
  127. (set #dest
  128. (askdir
  129.     (prompt ("Please select drawer for %s main program.\n" @app-name))
  130.     (help @askdir-help)
  131.     (default "Work:")
  132. ))
  133.  
  134. (set #doc_dest
  135. (askdir
  136.     (prompt "Please select drawer for documentation files.\n")
  137.     (help @askdir-help)
  138.     (default "HELP:english")
  139. ))
  140.  
  141. (copylib
  142.     (prompt "Installing reqtools.library ...\n")
  143.     (source "libs/reqtools.library")
  144.     (dest "LIBS:")
  145.     (help    @copylib-help)
  146.     (confirm 0)
  147. )
  148.  
  149. (if
  150.     (= (exists "C:MultiView") "0")(
  151.     (set #mv_check
  152.         (askbool
  153.             (prompt "\n"
  154.                     "Installer could not find MultiView in C: drawer."
  155.                     "\n\n\n"
  156.                     "You will be asked for MultiView location and then "
  157.                     "Installer will copy it to C: drawer"
  158.                     "\nYou may skip this part and copy it by yourself."
  159.                     "\n\n\nIf you do not copy MultiView to C: drawer "
  160.                     "Image Descriptor will disable View option."
  161.             )
  162.             (help @askbool-help)
  163.             (default 1)
  164.             (choices "Proceed" "Skip this part")
  165.         )
  166.     )
  167.     (if
  168.         (= #mv_check "1")
  169.         (
  170.         (set #mv_location
  171.         (askdir
  172.             (prompt "Where is MultiView")
  173.             (help @askdir-help)
  174.             (default "sys:utilities")
  175.         ))
  176.         (set #mv_file (tackon #mv_location "MultiView"))
  177.         (copyfiles
  178.             (prompt "Copying MultiView\n")
  179.             (source #mv_file)
  180.             (dest "C:")
  181.             (optional "nofail")
  182.         )
  183.         )
  184.     )
  185.     )
  186. )
  187.  
  188. (copyfiles
  189.     (prompt "Copying Image Descriptor main program ...\n")
  190.     (source "Program/ID")
  191.     (dest #dest)
  192. )
  193. (set #td_name (tackon #dest "ID"))
  194. (set #main_name (tackon #dest "ID*"))
  195. (set #main_icon (tackon #dest "ID.info*"))
  196.  
  197. (if
  198.     (= #doc-type "1")
  199.     (
  200.         (copyfiles
  201.             (prompt "Copying AmigaGuide file ...\n")
  202.             (help)
  203.             (source "program/id.guide")
  204.             (dest #doc_dest)
  205.             (newname "ID.Guide")
  206.         )
  207.     (set #doc_name (tackon #doc_dest "ID.Guide*"))
  208.     )
  209. )
  210.  
  211. (if
  212.     (= #doc-type "0")
  213.     (
  214.         (copyfiles
  215.             (prompt "Copying Text file ...\n")
  216.             (help)
  217.             (source "program/id.txt")
  218.             (dest #doc_dest)
  219.             (newname "ID.Txt")
  220.         )
  221.     (set #doc_name (tackon #doc_dest "ID.Txt*"))
  222.     )
  223. )
  224.  
  225. (if
  226.     (= #icon "0")
  227.     (
  228.            (copyfiles
  229.             (help @copyfiles-help)
  230.             (source "Icons/nor/ID.info")
  231.             (dest #dest)
  232.         )
  233.         (if
  234.             (= #doc-type "0")
  235.             (
  236.                 (copyfiles
  237.                     (help @copyfiles-help)
  238.                     (source "Icons/nor/id.guide.info")
  239.                     (dest #doc_dest)
  240.                     (newname "ID.Txt.info")
  241.                 )
  242.             (set #doc_icon (tackon #doc_dest "ID.Txt.info*"))
  243.             )
  244.         )
  245.         (if
  246.             (= #doc-type "1")
  247.             (
  248.                 (copyfiles
  249.                     (help @copyfiles-help)
  250.                     (source "Icons/nor/ID.Guide.info")
  251.                     (dest #doc_dest)
  252.                     )
  253.             (set #doc_icon (tackon #doc_dest "ID.Guide.info*"))
  254.             )
  255.         )
  256.     )
  257. )
  258.  
  259. (if
  260.     (= #icon "1")
  261.     (
  262.            (copyfiles
  263.             (help @copyfiles-help)
  264.             (source "Icons/mwb/ID.info")
  265.             (dest #dest)
  266.         )
  267.         (if
  268.             (= #doc-type "0")
  269.             (
  270.                 (copyfiles
  271.                     (help @copyfiles-help)
  272.                     (source "Icons/mwb/id.guide.info")
  273.                     (dest #doc_dest)
  274.                     (newname "ID.Txt.info")
  275.                 )
  276.             (set #doc_icon (tackon #doc_dest "ID.Txt.info*"))
  277.             )
  278.         )
  279.         (if
  280.             (= #doc-type "1")
  281.             (
  282.                 (copyfiles
  283.                     (help @copyfiles-help)
  284.                     (source "Icons/mwb/ID.Guide.info")
  285.                     (dest #doc_dest)
  286.                 )
  287.             (set #doc_icon (tackon #doc_dest "ID.Guide.info*"))
  288.             )
  289.         )
  290.     )
  291. )
  292.  
  293. (if
  294.     (= #icon "2")
  295.     (
  296.            (copyfiles
  297.             (help @copyfiles-help)
  298.             (source "Icons/new/ID.info")
  299.             (dest #dest)
  300.         )
  301.         (if
  302.             (= #doc-type "0")
  303.             (
  304.                 (copyfiles
  305.                     (help @copyfiles-help)
  306.                     (source "Icons/new/ID.Guide.info")
  307.                     (dest #doc_dest)
  308.                     (newname "ID.Txt.info")
  309.                 )
  310.             (set #doc_icon (tackon #doc_dest "ID.Txt.info*"))
  311.             )
  312.         )
  313.         (if
  314.             (= #doc-type "1")
  315.             (
  316.                 (copyfiles
  317.                     (help @copyfiles-help)
  318.                     (source "Icons/new/ID.Guide.info")
  319.                     (dest #doc_dest)
  320.                 )
  321.             (set #doc_icon (tackon #doc_dest "ID.Guide.info*"))
  322.             )
  323.         )
  324.     )
  325. )
  326. (if
  327.     (= (exists "S:ToolsDaemon.menu") "1")
  328.         (
  329.         (if
  330.             (= (exists "sys:prefs/ToolsPrefs") "1")
  331.             (
  332.                 (set #td_check
  333.                 (askbool
  334.                 (prompt "\n"
  335.                     "Installer detects ToolsDaemon installed on your AMIGA"
  336.                     "\n\n\n"
  337.                     "Would you like to add Image Descriptor to your "
  338.                     "ToolsDaemon menu?"
  339.                     "\nIf you select Proceed Installer will add new item at "
  340.                     "the BOTTOM of items list.\n"
  341.                     "Then ToolsPrefs will be launched so you can place Image Descriptor "
  342.                     "in your desired menu or submenu"
  343.                 )
  344.                 (help @askbool-help)
  345.                 (default 1)
  346.                 (choices "Proceed" "Skip this part")
  347.                 ))
  348.      (if
  349.         (= #td_check "1")
  350.         (
  351.         (working "Adding new item to ToolsDaemon menu..")
  352.         (copyfiles
  353.             (source "s:toolsdaemon.menu")
  354.             (dest "s:backup_of_toolsdaemon.menu")
  355.             (nogauge)
  356.             (optional "nofail")
  357.         )
  358.         (copyfiles
  359.             (source "s:toolsdaemon.menu")
  360.             (dest "t:")
  361.             (nogauge)
  362.             (optional "nofail")
  363.         )
  364.         (run "installerfx/item.exe")
  365.         (textfile
  366.             (prompt)
  367.             (dest "T:menu")
  368.             (include "T:toolsdaemon.menu")
  369.             (append " Image Descriptor\n")
  370.             (append "(WB) ")
  371.             (append #TD_NAME)
  372.             (append "\nEND\n")
  373.             )
  374.         (run "sys:prefs/toolsprefs T:menu")
  375.         (delete "t:toolsdaemon.menu")
  376.         (delete "t:menu")
  377.         ))
  378.     )
  379. ) )    )
  380.  
  381. (working "Creating unInstall information ...")
  382. (textfile
  383.     (prompt    "Creating unInstall information ...")
  384.     (help    @textfile-help)
  385.     (dest    "ENVARC:ImageDescriptor/unInstall")
  386.     (append "ENVARC:ImageDescriptor/unInstall*")
  387.     (append "ENVARC:ImageDescriptor*")
  388.     (append #main_name)
  389.     (append #main_icon)
  390.     (append #doc_name)
  391.     (append #doc_icon)
  392. )
  393.  
  394. (delete "t:gfx1")
  395. (delete "t:gfx1.prefs")
  396.  
  397. (exit "\n\n\n\n\n\nThank you for choosing Image Descriptor\nHope you enjoy it." (quiet))
  398. (welcome "Nice trick ;-). Greetinx to all my friends ...")
  399.